<?php

namespace app\index\validate;
use think\Validate;

class WechartValidate  extends Validate
{
    protected $rule =   [
        'code' => 'require',
        'loginCode' => 'require',
        'phoneCode' => 'require',
    ];

    protected $message  =   [
        'code.require' => 'code不能为空',
        'loginCode.require' => 'loginCode不能为空',
        'phoneCode.require' => 'phoneCode不能为空',
    ];

    protected $scene = [
        'login' => ['code'],
        'register' => ['loginCode', 'phoneCode'],
    ];
}